﻿using System;
using System.Xml.Serialization;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using PhoenixCrabV6.Engine.Images;

namespace PhoenixCrabV6.Engine.IO.Interface
{
    [XmlInclude(typeof(InterfaceElement))]
    public interface IInterfaceElement : IImage
    {
        event EventHandler OnLeftClicked;

        event EventHandler OnRightClicked;

        event EventHandler OnMiddleClicked;

        /// <summary>
        /// The area on the screen where the mouse can interact with this InterfaceElement
        /// </summary>
        Rectangle ClickableArea { get; }

        /// <summary>
        /// Checks if mouse cursor currently in clickable area
        /// </summary>
        /// <returns>If mouse currently in clickable area</returns>
        bool MouseInClickableArea();

        /// <summary>
        /// Call when left click made
        /// </summary>
        void LeftClick();

        /// <summary>
        /// call when right click made
        /// </summary>
        void RightClick();

        /// <summary>
        /// call when middle click made
        /// </summary>
        void MiddleClick();
    }
}